package com.bianyuanren.v4.service.advertising.impl;

import com.bianyuanren.common.core.text.Convert;
import com.bianyuanren.v4.mapper.advertising.PpAdvertisingMapper;
import com.bianyuanren.v4.pojo.advertising.PpAdvertising;
import com.bianyuanren.v4.service.advertising.IPpAdvertisingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 边缘人广告位Service业务层处理
 * 
 * @author pengpeng
 * @date 2020-06-04
 */
@Service
public class PpAdvertisingServiceImpl implements IPpAdvertisingService
{
    @Autowired
    private PpAdvertisingMapper ppAdvertisingMapper;

    /**
     * 查询边缘人广告位
     * 
     * @param advertisingId 边缘人广告位ID
     * @return 边缘人广告位
     */
    @Override
    public PpAdvertising selectPpAdvertisingById(Long advertisingId)
    {
        return ppAdvertisingMapper.selectPpAdvertisingById(advertisingId);
    }

    /**
     * 查询边缘人广告位列表
     * 
     * @param ppAdvertising 边缘人广告位
     * @return 边缘人广告位
     */
    @Override
    public List<PpAdvertising> selectPpAdvertisingList(PpAdvertising ppAdvertising)
    {
        return ppAdvertisingMapper.selectPpAdvertisingList(ppAdvertising);
    }

    /**
     * 新增边缘人广告位
     * 
     * @param ppAdvertising 边缘人广告位
     * @return 结果
     */
    @Override
    public int insertPpAdvertising(PpAdvertising ppAdvertising)
    {
        return ppAdvertisingMapper.insertPpAdvertising(ppAdvertising);
    }

    /**
     * 修改边缘人广告位
     * 
     * @param ppAdvertising 边缘人广告位
     * @return 结果
     */
    @Override
    public int updatePpAdvertising(PpAdvertising ppAdvertising)
    {
        return ppAdvertisingMapper.updatePpAdvertising(ppAdvertising);
    }

    /**
     * 删除边缘人广告位对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePpAdvertisingByIds(String ids)
    {
        return ppAdvertisingMapper.deletePpAdvertisingByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除边缘人广告位信息
     * 
     * @param advertisingId 边缘人广告位ID
     * @return 结果
     */
    @Override
    public int deletePpAdvertisingById(Long advertisingId)
    {
        return ppAdvertisingMapper.deletePpAdvertisingById(advertisingId);
    }
}
